package com.neusoft.edu.smartschool.app.view.activity;

import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.neu.edu.smartschool.mapplication.R;
import com.neusoft.edu.smartschool.app.parttern.presenter.LoginPresenter;
import com.neusoft.edu.smartschool.app.parttern.view.ILoginView;
import org.yeruyi.common.activity.RoyBaseActivity;
import butterknife.BindView;


/**
 * @author: yeruyi
 * @date: 2018/5/27
 * @email: yeruyi_roy@outlook.com
 * @modify: 2018/5/27 创建文件
 */
public class LoginActivity extends RoyBaseActivity<LoginPresenter> implements ILoginView {

    @BindView(R.id.login_student_number_et)
    EditText mLoginStudentNumberEt;
    @BindView(R.id.login_student_pwd_et)
    EditText mLoginStudentPwdEt;
    @BindView(R.id.login_enter_bt)
    Button mLoginEnterBt;
    @BindView(R.id.login_forget_pwd_tv)
    TextView mLoginForgetPwdTv;
    @BindView(R.id.login_back_question_tv)
    TextView mLoginBackQuestionTv;


    @Override
    protected int initLayout() {
        return R.layout.activity_login;
    }

    @Override
    protected LoginPresenter initPresenter() {
        return new LoginPresenter(this);
    }

    @Override
    protected void initActionBar() {

    }

    @Override
    protected void initViewEvent() {
        mLoginEnterBt.setOnClickListener(mPresenter);
        mLoginForgetPwdTv.setOnClickListener(mPresenter);
        mLoginBackQuestionTv.setOnClickListener(mPresenter);
    }

    @Override
    protected boolean initTitleStyle() {
        return false;
    }

    @Override
    public String getLoginName() {
        return mLoginStudentNumberEt.getText().toString().trim();
    }

    @Override
    public String getLoginPwd() {
        return mLoginStudentPwdEt.getText().toString().trim();
    }
}
